package com.itheima.domain.mongo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "Voice")
public class Voice implements Serializable {

    private ObjectId id; //主键id
    private String soundUrl;//语音地址
    @TableField(fill = FieldFill.INSERT)
    private Long created; //语音发送时间
    private Long userId; // 语音发送者id
    private Integer state = 0;//0表示未被拾取,1表示已被拾取,默认为0;



}